package P4.T06;

public class MonthOutofBoundsException extends Exception {
    private int month;

    public MonthOutofBoundsException(int month) {
        this.month=month;
    }

    @Override
    public String getMessage() {
        if(month<1)return "月份太小";
        else return "月份太大";
    }
    public int getMonth(){
        return month;
    }
}
